<?php 
	require dirname(__FILE__)."/lib/init.php";
	$page = empty($_GET["page"])?1:intval($_GET["page"]);
	$list = get_news_pagelist($page);
	$ct = get_news_count();
	$total = ceil($ct/15);
	
	$piclist = get_news_piclist();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>源牌</title>
	<link href="css/common.css" rel="stylesheet" type="text/css" />
	<script src="js/jquery.js" type="text/javascript"></script>
	<script src="js/jquery.easing.js" type="text/javascript"></script>
	<script src="js/jquery.timers.js" type="text/javascript"></script>
	<script src="js/jquery.carousel.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
	<style type="text/css">
		.splitline{margin-left: 21px;}
		.dian{padding-top: 0px;}
		
		#about{background:transparent url('images/newsbg.jpg') center top no-repeat;}
		
		.bx_wrap{position: relative; z-index: 1000;}
		.bx_wrap ul li{float: left;}
		.bx_wrap a.prev {width:59px;height:106px;position:absolute;top:45px;left:-110px;background:transparent url(images/prevbtn.png) left top no-repeat;text-decoration: none;}
		.bx_wrap a.next {width:59px;height:106px;position:absolute;top:45px;left:670px;background:transparent url(images/nextbtn.png) left top no-repeat;text-decoration: none;}
		.xxinfo{color:#666;text-decoration: none;}
	</style>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#newsbox").boxCarousel({display_num:3, move:1, controls:true}); 
		});
	</script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#li1").find(".mainmenu").attr("src","images/newss.jpg");
			$("#li1").addClass("mhover");
		});
	</script>
</head>
<body>
	<?php include 'header.php';?>
    <div id="container">
        <div id="pagebg" align="center">
            <div id="loading"><img src="images/loading.gif" alt=""/></div>
            <div id="loadbg"></div>
        </div>
		<div class="maincontent" style="background:transparent url('images/newsbg.png') center top no-repeat;">
			 <div style="padding-left: 212px;padding-top:130px;">
				 <div style="color: #305d22;font-weight: bold;font-size: 14px;float: left;text-align: center;width: 64px;">
				 	公司新闻
				 	<div><img src="images/arrow3.jpg" vspace="8"/></div> 
				 </div>
				 <div style="color: #666666;font-weight: bold;font-size: 14px;float: left;padding-left:450px;text-align: center;width: 64px">
				 	<a href="newspaper.php" style="color: #666666;text-decoration: none;">源牌报</a>
				 	<div style="display: none;"><img src="images/arrow3.jpg" vspace="8"/></div> 
				 </div>
				 <div class="clear"></div>
			 </div>
			 <div style="padding-left:200px;padding-top: 65px;height: 290px;">
			      <ul id="newsbox"> 
			      	  <?php foreach ($piclist as $p):?>
			          <li>
			          	<div style="width: 186px;float: left;padding-top:5px;">
					 		<div><img src="images/t1.jpg" /></div>
					 		<div style="font-family: 'arial';font-size: 18px;color: #333333;font-weight: bold;padding-top:15px;padding-bottom:15px;"><img src="images/arrow4.jpg" align="absmiddle"/>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $p["news_date"]?></div>
					 		<div style="line-height: 18px;font-size: 12px;color:#666666"><?php echo $p["news_title"]?></div>
					 	</div>
					 	<div class="dian"><img src="images/dian.gif" /></div>
					 	<div class="clear"></div>
			          </li> 
			          <?php endforeach;?>
			       </ul> 
			 </div>
			 <div style="height: 37px;padding-top:30px;">
			 	<div style="float: left;padding-left:285px;" class="xxinfo"><a href="news.php?page=<?php echo $page<=1?1:$page-1;?>" class="xxinfo">上一页</a></div>
			 	<div style="float: left;padding-left:125px;width: 50px;"><?php echo $page?>/<?php echo $total?> 页</div>
			 	<div style="float: left;padding-left:125px;"><a href="news.php?page=<?php echo $page>=$total?$total:$page+1;?>" class="xxinfo">下一页</a></div>
			 </div>
			 <div style="font-size: 12px;color:#666666;line-height: 36px;padding-left: 180px;padding-top:40px;">
			 	<ul>
			 		<?php foreach ($list as $o):?>
			 		<li><span style="padding-left: 10px;"><?php echo $o["news_date"]?></span><span style="padding-left: 30px;"><a href="news-info.php?oid=<?php echo $o["oid"];?>" class="xxinfo"><?php echo $o["news_title"]?></a></span></li>
			 		<?php endforeach;?>
			 	</ul>
			 </div>
			 <div style="height: 100px;">
			 </div>
			<?php include 'footer.php';?>
		</div>
	</div>
    <script type="text/javascript">
        loadImage('images/newsbg.jpg');
    </script>
</body>
</html>